option explicit

dim objAppPools, objAppPool
Set objAppPools = GetObject("IIS://localhost/W3SVC/AppPools")

for each objAppPool in objAppPools
	objAppPool.Stop()
	objAppPool.Start()
next
WScript.echo "App Pools restarted"
